const axios = require("axios");

const baseUrl = "http://localhost:3000";

// axios.defaults.baseURL = baseUrl;

const roleSave = baseUrl + "/role/save";

const roleFind = baseUrl + "/role";

const menuSave = baseUrl + "/menu/save";



const token =
  "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWQiOiIzNyIsImlhdCI6MTczMjg3MjcxMiwiZXhwIjoxNzMyODc1NzEyfQ.uEMIke09vgqve2HpussY8KKHU3EzdKGCGaRx1rtxLJ8";

const menudata = {
  id: null,
  parentId: "1",
  path: "user",
  name: "user",
  component: "user",
  meta: { title: "用户管理" },
};

const roleData = {
  // id: null,
  name: "admin",
  description: "管理员",
  menuIds: ["1", "2", "3", "4"],
};

axios
  .get(roleFind, {
    headers: {
      Authorization: token,
      "Content-Type": "application/json",
    },
  })
  .then((res) => {
    console.log(JSON.stringify(res.data,null,2));
  });

const menu = [
  {
    path: "authority",
    name: "authority",
    component: "authority",
    meta: { title: "权限管理" },
    children: [
      {
        path: "role",
        name: "role",
        component: "role",
        meta: { title: "角色管理" },
      },
      {
        path: "menu",
        name: "menu",
        component: "menu",
        meta: { title: "菜单管理" },
      },
      {
        path: "user",
        name: "user",
        component: "user",
        meta: { title: "用户管理" },
      },
    ],
  },
];
